home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-30 | 10.9 KB | 671 lines | [TEXT/CWIE] |
- { DDocData.p -- data container class for Gadgets}
-
- Unit DDocData;
- Interface
-
- Uses
- Types,
- OSUtils,
-
-
- AMSignaler;
-
- const
- idTriangle = longint ('Trie');
- idLeftRight = longint ('Left');
- idRadios = longint ('Rads');
- idBars = longint ('Bars');
- idStandard2 = longint ('Sta2');
- idGraphic = longint ('Grac');
- idSlider = longint ('Slir');
- idTickMarks = longint ('Tics');
- idNonDirectional = longint ('Nonl');
- idLittleArrows = longint ('Lits');
- idSpinner = longint ('Spir');
- idVolumeControl = longint ('Voll');
- idJimSSlider = longint ('Jimr');
- idStandard3 = longint ('Sta3');
- idIndeterminate = longint ('Inde');
- idChasingArrows = longint ('Chas');
- idRectangle = longint ('Rece');
- idRoundRect = longint ('Rout');
- idBarberPole = longint ('Bare');
- idRoundBarber = longint ('Rour');
- idSmall = longint ('Smal');
- idLarge = longint ('Lare');
- idX12345 = longint ('X145');
- idX12345e6 = longint ('X126');
- idPassword = longint ('Pasd');
- idTheDate = longint ('Thee');
- idTheTime = longint ('Thee');
- idStyled = longint ('Styd');
-
- type
- {----------}
- DDocData = object (AMSignaler)
-
- {data members}
- mTriangle: Boolean;
- mLeftRight: Boolean;
- mRadios: SInt16;
- mBars: UInt16;
- mStandard2: SInt16;
- mGraphic: SInt16;
- mSlider: SInt16;
- mTickMarks: SInt16;
- mNonDirectional: SInt16;
- mLittleArrows: SInt16;
- mSpinner: SInt16;
- mVolumeControl: SInt16;
- mJimSSlider: SInt16;
- mStandard3: SInt16;
- mIndeterminate: SInt16;
- mChasingArrows: SInt16;
- mRectangle: SInt16;
- mRoundRect: SInt16;
- mBarberPole: SInt16;
- mRoundBarber: SInt16;
- mSmall: Str255;
- mLarge: Str255;
- mX12345: SInt32;
- mX12345e6: double;
- mPassword: Str255;
- mTheDate: LongDateRec;
- mTheTime: LongDateRec;
- mStyled: Str255;
-
- {methods}
- Procedure Initialize; Override;
-
- Function GetTriangle: Boolean;
- Procedure SetTriangle (inValue: Boolean);
- Function GetLeftRight: Boolean;
- Procedure SetLeftRight (inValue: Boolean);
- Function GetRadios: SInt16;
- Procedure SetRadios (inValue: SInt16);
- Function GetBars: UInt16;
- Procedure SetBars (inValue: UInt16);
- Function GetStandard2: SInt16;
- Procedure SetStandard2 (inValue: SInt16);
- Function GetGraphic: SInt16;
- Procedure SetGraphic (inValue: SInt16);
- Function GetSlider: SInt16;
- Procedure SetSlider (inValue: SInt16);
- Function GetTickMarks: SInt16;
- Procedure SetTickMarks (inValue: SInt16);
- Function GetNonDirectional: SInt16;
- Procedure SetNonDirectional (inValue: SInt16);
- Function GetLittleArrows: SInt16;
- Procedure SetLittleArrows (inValue: SInt16);
- Function GetSpinner: SInt16;
- Procedure SetSpinner (inValue: SInt16);
- Function GetVolumeControl: SInt16;
- Procedure SetVolumeControl (inValue: SInt16);
- Function GetJimSSlider: SInt16;
- Procedure SetJimSSlider (inValue: SInt16);
- Function GetStandard3: SInt16;
- Procedure SetStandard3 (inValue: SInt16);
- Function GetIndeterminate: SInt16;
- Procedure SetIndeterminate (inValue: SInt16);
- Function GetChasingArrows: SInt16;
- Procedure SetChasingArrows (inValue: SInt16);
- Function GetRectangle: SInt16;
- Procedure SetRectangle (inValue: SInt16);
- Function GetRoundRect: SInt16;
- Procedure SetRoundRect (inValue: SInt16);
- Function GetBarberPole: SInt16;
- Procedure SetBarberPole (inValue: SInt16);
- Function GetRoundBarber: SInt16;
- Procedure SetRoundBarber (inValue: SInt16);
- Function GetSmall: Str255;
- Procedure SetSmall (inValue: Str255);
- Function GetLarge: Str255;
- Procedure SetLarge (inValue: Str255);
- Function GetX12345: SInt32;
- Procedure SetX12345 (inValue: SInt32);
- Function GetX12345e6: double;
- Procedure SetX12345e6 (inValue: double);
- Function GetPassword: Str255;
- Procedure SetPassword (inValue: Str255);
- Function GetTheDate: LongDateRec;
- Procedure SetTheDate (inValue: LongDateRec);
- Function GetTheTime: LongDateRec;
- Procedure SetTheTime (inValue: LongDateRec);
- Function GetStyled: Str255;
- Procedure SetStyled (inValue: Str255);
- end;
-
- {----------}
- Function NewDDocData: DDocData;
-
- {----------}
- Implementation
-
- {----------}
- Function NewDDocData: DDocData;
- var
- data: DDocData;
- begin
- data := nil;
- New (data);
- if data <> nil then begin
- data.Initialize;
- end;
- NewDDocData := data;
- end;
-
- {----------}
- Procedure DDocData.Initialize;
- begin
- inherited Initialize;
-
- mTriangle := false;
- mLeftRight := false;
- mRadios := 0;
- mBars := 0;
- mStandard2 := 5;
- mGraphic := 5;
- mSlider := 5;
- mTickMarks := 5;
- mNonDirectional := 5;
- mLittleArrows := 5;
- mSpinner := 5;
- mVolumeControl := 3;
- mJimSSlider := 5;
- mStandard3 := 5;
- mIndeterminate := 5;
- mChasingArrows := 5;
- mRectangle := 5;
- mRoundRect := 5;
- mBarberPole := 5;
- mRoundBarber := 5;
- mSmall := 'small';
- mLarge := 'large';
- mX12345 := 0;
- mX12345e6 := 0.0;
- mPassword := 'password';
- mTheDate.eraAlt := 0;
- GetTime (mTheDate.oldDate);
- mTheTime.eraAlt := 0;
- GetTime (mTheTime.oldDate);
- mStyled := 'styled';
- end;
-
- {----------}
- Function DDocData.GetTriangle: Boolean;
- begin
- GetTriangle := mTriangle;
-
-
- end;
-
- Procedure DDocData.SetTriangle (
- inValue: Boolean);
- begin
- mTriangle := inValue;
-
-
- SignalDataChanged (idTriangle);
- end;
-
- {----------}
- Function DDocData.GetLeftRight: Boolean;
- begin
- GetLeftRight := mLeftRight;
-
-
- end;
-
- Procedure DDocData.SetLeftRight (
- inValue: Boolean);
- begin
- mLeftRight := inValue;
-
-
- SignalDataChanged (idLeftRight);
- end;
-
- {----------}
- Function DDocData.GetRadios: SInt16;
- begin
- GetRadios := mRadios;
-
-
- end;
-
- Procedure DDocData.SetRadios (
- inValue: SInt16);
- begin
- mRadios := inValue;
-
-
- SignalDataChanged (idRadios);
- end;
-
- {----------}
- Function DDocData.GetBars: UInt16;
- begin
- GetBars := mBars;
-
-
- end;
-
- Procedure DDocData.SetBars (
- inValue: UInt16);
- begin
- mBars := inValue;
-
-
- SignalDataChanged (idBars);
- end;
-
- {----------}
- Function DDocData.GetStandard2: SInt16;
- begin
- GetStandard2 := mStandard2;
-
-
- end;
-
- Procedure DDocData.SetStandard2 (
- inValue: SInt16);
- begin
- mStandard2 := inValue;
-
-
- SignalDataChanged (idStandard2);
- end;
-
- {----------}
- Function DDocData.GetGraphic: SInt16;
- begin
- GetGraphic := mGraphic;
-
-
- end;
-
- Procedure DDocData.SetGraphic (
- inValue: SInt16);
- begin
- mGraphic := inValue;
-
-
- SignalDataChanged (idGraphic);
- end;
-
- {----------}
- Function DDocData.GetSlider: SInt16;
- begin
- GetSlider := mSlider;
-
-
- end;
-
- Procedure DDocData.SetSlider (
- inValue: SInt16);
- begin
- mSlider := inValue;
-
-
- SignalDataChanged (idSlider);
- end;
-
- {----------}
- Function DDocData.GetTickMarks: SInt16;
- begin
- GetTickMarks := mTickMarks;
-
-
- end;
-
- Procedure DDocData.SetTickMarks (
- inValue: SInt16);
- begin
- mTickMarks := inValue;
-
-
- SignalDataChanged (idTickMarks);
- end;
-
- {----------}
- Function DDocData.GetNonDirectional: SInt16;
- begin
- GetNonDirectional := mNonDirectional;
-
-
- end;
-
- Procedure DDocData.SetNonDirectional (
- inValue: SInt16);
- begin
- mNonDirectional := inValue;
-
-
- SignalDataChanged (idNonDirectional);
- end;
-
- {----------}
- Function DDocData.GetLittleArrows: SInt16;
- begin
- GetLittleArrows := mLittleArrows;
-
-
- end;
-
- Procedure DDocData.SetLittleArrows (
- inValue: SInt16);
- begin
- mLittleArrows := inValue;
-
-
- SignalDataChanged (idLittleArrows);
- end;
-
- {----------}
- Function DDocData.GetSpinner: SInt16;
- begin
- GetSpinner := mSpinner;
-
-
- end;
-
- Procedure DDocData.SetSpinner (
- inValue: SInt16);
- begin
- mSpinner := inValue;
-
-
- SignalDataChanged (idSpinner);
- end;
-
- {----------}
- Function DDocData.GetVolumeControl: SInt16;
- begin
- GetVolumeControl := mVolumeControl;
-
-
- end;
-
- Procedure DDocData.SetVolumeControl (
- inValue: SInt16);
- begin
- mVolumeControl := inValue;
-
-
- SignalDataChanged (idVolumeControl);
- end;
-
- {----------}
- Function DDocData.GetJimSSlider: SInt16;
- begin
- GetJimSSlider := mJimSSlider;
-
-
- end;
-
- Procedure DDocData.SetJimSSlider (
- inValue: SInt16);
- begin
- mJimSSlider := inValue;
-
-
- SignalDataChanged (idJimSSlider);
- end;
-
- {----------}
- Function DDocData.GetStandard3: SInt16;
- begin
- GetStandard3 := mStandard3;
-
-
- end;
-
- Procedure DDocData.SetStandard3 (
- inValue: SInt16);
- begin
- mStandard3 := inValue;
-
-
- SignalDataChanged (idStandard3);
- end;
-
- {----------}
- Function DDocData.GetIndeterminate: SInt16;
- begin
- GetIndeterminate := mIndeterminate;
-
-
- end;
-
- Procedure DDocData.SetIndeterminate (
- inValue: SInt16);
- begin
- mIndeterminate := inValue;
-
-
- SignalDataChanged (idIndeterminate);
- end;
-
- {----------}
- Function DDocData.GetChasingArrows: SInt16;
- begin
- GetChasingArrows := mChasingArrows;
-
-
- end;
-
- Procedure DDocData.SetChasingArrows (
- inValue: SInt16);
- begin
- mChasingArrows := inValue;
-
-
- SignalDataChanged (idChasingArrows);
- end;
-
- {----------}
- Function DDocData.GetRectangle: SInt16;
- begin
- GetRectangle := mRectangle;
-
-
- end;
-
- Procedure DDocData.SetRectangle (
- inValue: SInt16);
- begin
- mRectangle := inValue;
-
-
- SignalDataChanged (idRectangle);
- end;
-
- {----------}
- Function DDocData.GetRoundRect: SInt16;
- begin
- GetRoundRect := mRoundRect;
-
-
- end;
-
- Procedure DDocData.SetRoundRect (
- inValue: SInt16);
- begin
- mRoundRect := inValue;
-
-
- SignalDataChanged (idRoundRect);
- end;
-
- {----------}
- Function DDocData.GetBarberPole: SInt16;
- begin
- GetBarberPole := mBarberPole;
-
-
- end;
-
- Procedure DDocData.SetBarberPole (
- inValue: SInt16);
- begin
- mBarberPole := inValue;
-
-
- SignalDataChanged (idBarberPole);
- end;
-
- {----------}
- Function DDocData.GetRoundBarber: SInt16;
- begin
- GetRoundBarber := mRoundBarber;
-
-
- end;
-
- Procedure DDocData.SetRoundBarber (
- inValue: SInt16);
- begin
- mRoundBarber := inValue;
-
-
- SignalDataChanged (idRoundBarber);
- end;
-
- {----------}
- Function DDocData.GetSmall: Str255;
- begin
- GetSmall := mSmall;
-
-
- end;
-
- Procedure DDocData.SetSmall (
- inValue: Str255);
- begin
- mSmall := inValue;
-
-
- SignalDataChanged (idSmall);
- end;
-
- {----------}
- Function DDocData.GetLarge: Str255;
- begin
- GetLarge := mLarge;
-
-
- end;
-
- Procedure DDocData.SetLarge (
- inValue: Str255);
- begin
- mLarge := inValue;
-
-
- SignalDataChanged (idLarge);
- end;
-
- {----------}
- Function DDocData.GetX12345: SInt32;
- begin
- GetX12345 := mX12345;
-
-
- end;
-
- Procedure DDocData.SetX12345 (
- inValue: SInt32);
- begin
- mX12345 := inValue;
-
-
- SignalDataChanged (idX12345);
- end;
-
- {----------}
- Function DDocData.GetX12345e6: double;
- begin
- GetX12345e6 := mX12345e6;
-
-
- end;
-
- Procedure DDocData.SetX12345e6 (
- inValue: double);
- begin
- mX12345e6 := inValue;
-
-
- SignalDataChanged (idX12345e6);
- end;
-
- {----------}
- Function DDocData.GetPassword: Str255;
- begin
- GetPassword := mPassword;
-
-
- end;
-
- Procedure DDocData.SetPassword (
- inValue: Str255);
- begin
- mPassword := inValue;
-
-
- SignalDataChanged (idPassword);
- end;
-
- {----------}
- Function DDocData.GetTheDate: LongDateRec;
- begin
- GetTheDate := mTheDate;
-
-
- end;
-
- Procedure DDocData.SetTheDate (
- inValue: LongDateRec);
- begin
- mTheDate := inValue;
-
-
- SignalDataChanged (idTheDate);
- end;
-
- {----------}
- Function DDocData.GetTheTime: LongDateRec;
- begin
- GetTheTime := mTheTime;
-
-
- end;
-
- Procedure DDocData.SetTheTime (
- inValue: LongDateRec);
- begin
- mTheTime := inValue;
-
-
- SignalDataChanged (idTheTime);
- end;
-
- {----------}
- Function DDocData.GetStyled: Str255;
- begin
- GetStyled := mStyled;
-
-
- end;
-
- Procedure DDocData.SetStyled (
- inValue: Str255);
- begin
- mStyled := inValue;
-
-
- SignalDataChanged (idStyled);
- end;
-
- end.
-